package core.bmp.worker.color;

import java.io.File;
import java.io.IOException;

import core.bmp.AbsPixWorker;
import core.bmp.Bmp;
import core.bmp.model.Pixel;
import core.bmp.utils.PixelUtil;

public class GrayWorker extends AbsPixWorker {

	@Override
	protected File onPrepareImageFile() {
		return Bmp.BMP_LENA;
	}

	@Override
	public void handlerPix(Pixel pixel) {
		PixelUtil.setGray(pixel, pixel.getRed());
	}

	public static void main(String[] args) throws IOException {
		new GrayWorker().start();
	}

}
